package com.caine.multithread;

/**
 * @Author: CaineZhu
 * @Description:
 * @Date: Created in 10:05 2020/11/3
 * @Modified By:
 */
public class Demo01 implements  Runnable{
    boolean flag = true;
    public static void main(String[] args) throws InterruptedException {
        Demo01 demo01 = new Demo01();
        new Thread(demo01).start();
        Thread.sleep(1000);
        demo01.flag = false;

    }

    @Override
    public void run() {
        System.out.println(">>>start");
        while (flag){
            System.out.println(11111);
        }
        System.out.println(">>>end");
    }
}
